<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Container File Upload</title>
    <style type="text/css">
        input[type=text] {
            width:300px;
        }
    </style>
</head>
<body>

<h1>Container File Upload</h1>
<form action="upload" method="post" enctype="multipart/form-data" id="upload-form">
    <p>ContainerID: <input type="text" name="containerID" id="containerID"></p>
    <p>HostIP: <input type="text" name="hostIP" id="hostIP"></p>
    <p>Path: <input type="text" name="path" id="path"></p>
    <p>File: <input type="file" name="file"></p>
    <p><input type="button" value="submit" onclick="onUpload(this)"></p>
</form>

<script type="text/javascript">
    function onUpload(elem) {
        var containerID = document.getElementById("containerID");
        var hostIP = document.getElementById("hostIP");
        var path = document.getElementById("path");
        var form = document.getElementById("upload-form");
        form.setAttribute("action", "/api/container/" + containerID.value + "/files/upload");
        form.submit();
    }
</script>
</body>
</html>